import React, { Component } from 'react'
import { Provider } from 'react-redux'
import store from './store'
import { BrowserRouter} from 'react-router-dom'

// 路由封装组件
import ChechAuth from './router/'
import { routerConfig } from './router/config'


class App extends Component {
  render() {
    return (
      <Provider store={store}>
        <BrowserRouter>
          <div style={{ position: 'fixed', height: '100%', width: '100%', top: 0 }}>
            {/* 自定义路由守卫 */}
            <ChechAuth config={routerConfig}></ChechAuth>
          </div>
        </BrowserRouter>
      </Provider>
    );
  }
}

export default App;
